package com.wzf.controller;

import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.stereotype.Component;


@Component
public class MyApplicationListener implements ApplicationListener<ContextRefreshedEvent> {
    @Override
    public void onApplicationEvent(ContextRefreshedEvent event) {
        System.out.println("----------------------"+event.getClass().getName());
        System.out.println("----------------------"+event.getApplicationContext().getApplicationName());
        System.out.println("----------------------");
        System.out.println("----------------------");
    }
}
